import request from '@/utils/request'


// 查询供应商信息详细
export function selectSupBySupCode(supCode) {
  return request({
    url: '/basic/supplier/selectSupBySupCode/' + supCode,
    method: 'get'
  })
}

// 查询产品列表
export function listSup(query) {
  return request({
    url: '/basic/supplier/list',
    method: 'get',
    params: query
  })
}


// 查询供应商信息列表
export function listSupplier(query) {
  return request({
    url: '/basic/supplier/list',
    method: 'get',
    params: query
  })
}

// 查询供应商信息详细
export function getSupplier(supCode) {
  return request({
    url: '/basic/supplier/' + supCode,
    method: 'get'
  })
}

// 新增供应商信息
export function addSupplier(data) {
  return request({
    url: '/basic/supplier',
    method: 'post',
    data: data
  })
}

// 修改供应商信息
export function updateSupplier(data) {
  return request({
    url: '/basic/supplier',
    method: 'put',
    data: data
  })
}

// 删除供应商信息
export function delSupplier(supCode) {
  return request({
    url: '/basic/supplier/' + supCode,
    method: 'delete'
  })
}
